import add from '../components/product/add.vue'
import admin_saveUnit from '../components/product/admin_saveUnit.vue'
import  admin_list from  '../components/product/admin_list.vue'
import admin_element from  '../components/product/admin_element'


import admin_index from  '../components/product/admin_index.vue'
import admin_product from '../components/product/admin_product'
import product_details from '../components/product/Product_Details'
import element_details from  '../components/product/element_details'



export default {
  routes: [
      {
          path:'/admin_index',
          component:admin_index,
          children:[
              {
                  path:'admin_product',
                  component:admin_product
              },
              {
                  path: 'product_details/:pid',
                  component: product_details
              },
              {
                  path:'admin_saveUnit',
                  component:admin_saveUnit
              },
              {
                  path:'admin_element',
                  component:admin_element
              },
              {
                  path:'add',
                  component:add
              },
              {
                  path:'admin_saveUnit',
                  component:admin_saveUnit
              },
              {
                  path:'element_details/:hash',
                  component:element_details
              },
              {
                  path:'admin_list',
                  component:admin_list
              },
              // {
              //     path:'admin_test',
              //     component:admin_test
              // }

          ]
      },
      {
          path:'/',  // path路径
          redirect:'/admin_index'  // 重定向指向的路径
      },


  ]
}
